<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
    <div id="demo"></div>
</body>
<script src="./node_modules/react/umd/react.development.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="./node_modules/babel-standalone/babel.min.js"></script>
<script type="text/babel">
    // <!原生语法 -->
    const title = React.createElement("h1",{id:"text"},"第一道题",(new Date().toLocaleString()))
    // 3、使用 ReactDOM.render(element,container)
    ReactDOM.render(title,document.getElementById("demo"))
    // jsx语法
    const time = new Date().toLocaleString()
    console.log(time);
    const H1 = <h1 id="title">我是一级标题<p>{time}</p></h1>
    ReactDOM.render(H1,document.getElementById("app"))
</script>
</html>